package cn.tedu.bonfire.admin.content.startup;

import cn.tedu.bonfire.admin.content.service.IArticleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ArticleSearchRunner implements ApplicationRunner {

    @Autowired
    private IArticleService articleService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.debug("开始执行【重建文章的搜索数据】的数据预热");
        articleService.rebuildSearch();
    }

}
